import request from '@/utils/request'

export function get(id) {
  return request({
    baseURL: process.env.VUE_APP_BASE_API_FILE_SERVER,
    url: `/binaryObjects/${id}`,
    method: 'get'
  })
}

export function create(parms, data) {
  return request({
    baseURL: process.env.VUE_APP_BASE_API_FILE_SERVER,
    url: `/binaryObjects:useFile${parms}`,
    method: 'post',
    data,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  })
}
